<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>追加文本</title>
	<script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
	<script>
		function appendText()
		{
			var txt1="<p>Text.</p>";
			var txt2=$("<p></p>").text("Text.");
			var txt3=document.createElement("p");
			txt3.innerHTML="Text.";
			$("body").append(txt1,txt2,txt3);

		}
	</script>
</head>
<body>
<p>这是一个段落</p>
<button onclick="appendText()">追加文本</button>

</body>
</html>